<?php

/* @var $this yii\web\View */
use yii\helpers\Html;
use yii\helpers\Url;


$this->title = '高品';
?>

<!--
    	作者：732511064@qq.com
    	时间：2017-03-29
    	描述：轮播图
    -->
<script type="text/javascript" src="../../web/js/jQuery-1.10.1.min.js" ></script>
<section>

	<link rel="stylesheet" href="../css/bootstrap.min.css">
	<script src="../js/jQuery-1.10.1.min.js"></script>
	<script src="../js/bootstrap.min.js"></script>

<div id="myCarousel" class="carousel slide">
	<!-- 轮播（Carousel）指标 -->
	<ol class="carousel-indicators">
		<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
		<li data-target="#myCarousel" data-slide-to="1"></li>
		<li data-target="#myCarousel" data-slide-to="2"></li>
	</ol>
	<!-- 轮播（Carousel）项目 -->
	<div class="carousel-inner">
		<div class="item active">
			<img src="../images/file1.jpg" alt="First slide" style="background: no-repeat;margin:auto;">
		</div>
		<div class="item">
			<img src="../images/file2.jpg" alt="Second slide" style="background: no-repeat;margin:auto;">
		</div>
		<div class="item">
			<img src="../images/file3.jpg" alt="Third slide" style="background: no-repeat;margin:auto;">
		</div>
	</div>
	<!-- 轮播（Carousel）导航 -->
	<a class="carousel-control left" href="#myCarousel"
	   data-slide="prev">&lsaquo;</a>
	<a class="carousel-control right" href="#myCarousel"
	   data-slide="next">&rsaquo;</a>
</div>

</section>



<section>
	
		<div class="xuanze">
			<div class="xuanze1">
                <?foreach ($type as $k=>$v){?>
				<div class="div<?=$k+1?>"><a href="javascript:void(0)" class="a<?=$k+1?>"><?=$v['type_name']?></a></div>
                <?}?>
			</div>

     	<?foreach ($type as $tk=>$tv){?>
            <div class="xuanzetu<?if($tk!=0) echo $tk+1; ?>">
                <div class="grid">
                <?foreach ($images[$tk] as $ik=>$iv){?>
                        <figure class="<?=$shuxing[$ik][0]?>">

                            <img src="<?=$iv['url']?>" alt="<?=$shuxing[$ik][1]?>"/>

                            <figcaption>

                                <h2><?=$iv['img_name']?></h2>

                                <p><?=$iv['address']?><br>更多详情点击进入</p>

                                <?=Html::a('',
                                \yii\helpers\Url::to(['site/info','id'=>$iv['id']]),['style'=>'margin-right:5px'])?>

                            </figcaption>

                        </figure>

                <?}?>
                </div>
            </div>
        <?}?>
        	
     	<script>
		$(function(p){
					$(".div1").click(function(){
						$(".div1 a").css({"background":"#000000","color":"#ffffff"});	
						$(".div2 a").css({"background":"#ffffff","color":"#000000"});
						$(".div3 a").css({"background":"#ffffff","color":"#000000"});
					})
					$(".div2").click(function(){
						$(".div2 a").css({"background":"#000000","color":"#ffffff"});	
						$(".div1 a").css({"background":"#ffffff","color":"#000000"});	
						$(".div3 a").css({"background":"#ffffff","color":"#000000"});					
					})
					$(".div3").click(function(){
						$(".div3 a").css({"background":"#000000","color":"#ffffff"});	
						$(".div1 a").css({"background":"#ffffff","color":"#000000"});	
						$(".div2 a").css({"background":"#ffffff","color":"#000000"});						
					})
			})
	</script>
     	</div>
	</section>
	<section class="fankui">
		<a href="#" class="fankui1"><img src="../images/qq.png"></a>
	</section>
	<section class="cta">
		<a href="#" class="cta_btn"><img src="../images/jiantou.png"></a>
	</section>



<!--<div>-->
<?php
//    foreach($imgmodel as $k =>$v)
//    {
//        echo Html::a(Html::img( Yii::$app->request->hostInfo.'\\'.$v->url,
//            ['width'=>373,'height'=>300]),
//            \yii\helpers\Url::to(['site/info','id'=>$v->id]),['style'=>'margin-right:5px']);
//        if (($k+1)%3==0)
//            echo "<div style='margin-bottom: 5px'></div>";
//    }
//
//?>
<!--</div>-->

<?//= $this->render('tab',['typedata'=>$typedata,'imgmodel'=>$imgmodel]) ?>

